/// Business logic class defined by OpenAPI in HCC.Interface.Transform.spec<br/>
/// Created Aug 3, 2023 13:33:12
Class HCC.Interface.Transform.impl Extends %REST.Impl [ ProcedureBlock ]
{

/// If ExposeServerExceptions is true, then details of internal errors will be exposed.
Parameter ExposeServerExceptions = 0;

/// 检查申请单新增<br/>
/// The method arguments hold values for:<br/>
///     body, 文档路径<br/>
ClassMethod NewCheckRequst(body As %Stream.Object) As %Stream.Object
{
    //(Place business logic here)
    //Do ..%SetStatusCode(<HTTP_status_code>)
    //Do ..%SetHeader(<name>,<value>)
    //Quit (Place response here) ; response may be a string, stream or dynamic object
    Set tSC = $$$OK
    Try
    {
        #; w body
        set xmlDoc = ##class(EnsLib.EDI.XML.Document).ImportFromLibraryStream(body)
        set tSC = ##class(HCC.DT.HCC2HL72.NewCheckRequst).Transform(xmlDoc,.output)
        #; w tSC
        #; set tSC = "{""json received"": ""yes""}"
    }
    catch (ex) {
    throw ex }
    Quit output
}

/// 输血申请单新增<br/>
/// The method arguments hold values for:<br/>
///     body, 文档路径<br/>
ClassMethod NewBloodProdRequst(body As %Stream.Object) As %Stream.Object
{
    //(Place business logic here)
    //Do ..%SetStatusCode(<HTTP_status_code>)
    //Do ..%SetHeader(<name>,<value>)
    //Quit (Place response here) ; response may be a string, stream or dynamic object
    Set tSC = $$$OK
    Try
    {
        #; w body
        set xmlDoc = ##class(EnsLib.EDI.XML.Document).ImportFromLibraryStream(body)
        set tSC = ##class(HCC.DT.HCC2HL72.NewBloodProdRequst).Transform(xmlDoc,.output)
        #; w tSC
        #; set tSC = "{""json received"": ""yes""}"
    }
    catch (ex) {
    throw ex }
    Quit output
}

/// 医嘱信息新增<br/>
/// The method arguments hold values for:<br/>
///     body, 文档路径<br/>
ClassMethod NewOrderRequst(body As %Stream.Object) As %Stream.Object
{
    //(Place business logic here)
    //Do ..%SetStatusCode(<HTTP_status_code>)
    //Do ..%SetHeader(<name>,<value>)
    //Quit (Place response here) ; response may be a string, stream or dynamic object
    Set tSC = $$$OK
    Try
    {
        #; w body
        set xmlDoc = ##class(EnsLib.EDI.XML.Document).ImportFromLibraryStream(body)
        set tSC = ##class(HCC.DT.HCC2HL72.NewOrderRequst).Transform(xmlDoc,.output)
        #; w tSC
        #; set tSC = "{""json received"": ""yes""}"
    }
    catch (ex) {
    throw ex }
    Quit output
}

/// 病理申请单新增<br/>
/// The method arguments hold values for:<br/>
///     body, 文档路径<br/>
ClassMethod NewPathTestRequst(body As %Stream.Object) As %Stream.Object
{
    //(Place business logic here)
    //Do ..%SetStatusCode(<HTTP_status_code>)
    //Do ..%SetHeader(<name>,<value>)
    //Quit (Place response here) ; response may be a string, stream or dynamic object
    Set tSC = $$$OK
    Try
    {
        #; w body
        set xmlDoc = ##class(EnsLib.EDI.XML.Document).ImportFromLibraryStream(body)
        set tSC = ##class(HCC.DT.HCC2HL72.NewPathTestRequst).Transform(xmlDoc,.output)
        #; w tSC
        #; set tSC = "{""json received"": ""yes""}"
    }
    catch (ex) {
    throw ex }
    Quit output
}

/// 医嘱执行状态信息更新<br/>
/// The method arguments hold values for:<br/>
///     body, 文档路径<br/>
ClassMethod OrderStatusUpdate(body As %Stream.Object) As %Stream.Object
{
    //(Place business logic here)
    //Do ..%SetStatusCode(<HTTP_status_code>)
    //Do ..%SetHeader(<name>,<value>)
    //Quit (Place response here) ; response may be a string, stream or dynamic object
    Set tSC = $$$OK
    Try
    {
        #; w body
        set xmlDoc = ##class(EnsLib.EDI.XML.Document).ImportFromLibraryStream(body)
        set tSC = ##class(HCC.DT.HCC2HL72.OrderStatusUpdate).Transform(xmlDoc,.output)
        #; w tSC
        #; set tSC = "{""json received"": ""yes""}"
    }
    catch (ex) {
    throw ex }
    Quit output
}

/// (provide functional description here)<br/>
/// The method arguments hold values for:<br/>
///     body, 文档路径<br/>
ClassMethod MockTest(body As %Stream.Object) As %Stream.Object
{
    //(Place business logic here)
    //Do ..%SetStatusCode(<HTTP_status_code>)
    //Do ..%SetHeader(<name>,<value>)
    //Quit (Place response here) ; response may be a string, stream or dynamic object
}

/// 个人信息更新<br/>
/// The method arguments hold values for:<br/>
///     body, 文档路径<br/>
ClassMethod PatInfoUpdRequst(body As %Stream.Object) As %Stream.Object
{
    //(Place business logic here)
    //Do ..%SetStatusCode(<HTTP_status_code>)
    //Do ..%SetHeader(<name>,<value>)
    //Quit (Place response here) ; response may be a string, stream or dynamic object
    Set tSC = $$$OK
    Try
    {
        #; w body
        set xmlDoc = ##class(EnsLib.EDI.XML.Document).ImportFromLibraryStream(body)
        set tSC = ##class(HCC.DT.HCC2HL72.PatInfoUpdRequst).Transform(xmlDoc,.output)
        #; w tSC
        #; set tSC = "{""json received"": ""yes""}"
    }
    catch (ex) {
    throw ex }
    Quit output
}

/// 个人信息合并<br/>
/// The method arguments hold values for:<br/>
///     body, 文档路径<br/>
ClassMethod PatMergRequst(body As %Stream.Object) As %Stream.Object
{
    //(Place business logic here)
    //Do ..%SetStatusCode(<HTTP_status_code>)
    //Do ..%SetHeader(<name>,<value>)
    //Quit (Place response here) ; response may be a string, stream or dynamic object
    Set tSC = $$$OK
    Try
    {
        #; w body
        set xmlDoc = ##class(EnsLib.EDI.XML.Document).ImportFromLibraryStream(body)
        set tSC = ##class(HCC.DT.HCC2HL72.PatMergRequst).Transform(xmlDoc,.output)
        #; w tSC
        #; set tSC = "{""json received"": ""yes""}"
    }
    catch (ex) {
    throw ex }
    Quit output
}

/// 个人信息查询<br/>
/// The method arguments hold values for:<br/>
///     body, 文档路径<br/>
ClassMethod PatientInfoQuery(body As %Stream.Object) As %Stream.Object
{
    //(Place business logic here)
    //Do ..%SetStatusCode(<HTTP_status_code>)
    //Do ..%SetHeader(<name>,<value>)
    //Quit (Place response here) ; response may be a string, stream or dynamic object
    Set tSC = $$$OK
    Try
    {
        #; w body
        set xmlDoc = ##class(EnsLib.EDI.XML.Document).ImportFromLibraryStream(body)
        set tSC = ##class(HCC.DT.HCC2HL72.PatientInfoQuery).Transform(xmlDoc,.output)
        #; w tSC
        #; set tSC = "{""json received"": ""yes""}"
    }
    catch (ex) {
    throw ex }
    Quit output
}

/// 个人信息注册<br/>
/// The method arguments hold values for:<br/>
///     body, 文档路径<br/>
ClassMethod PatientInfoRegister(body As %Stream.Object) As %Stream.Object
{
    //(Place business logic here)
    //Do ..%SetStatusCode(<HTTP_status_code>)
    //Do ..%SetHeader(<name>,<value>)
    //Quit (Place response here) ; response may be a string, stream or dynamic object
    Set tSC = $$$OK
    Try
    {
        #; w body
        set xmlDoc = ##class(EnsLib.EDI.XML.Document).ImportFromLibraryStream(body)
        set tSC = ##class(HCC.DT.HCC2HL72.PatientInfoRegister).Transform(xmlDoc,.output)
        #; w tSC
        #; set tSC = "{""json received"": ""yes""}"
    }
    catch (ex) {
    throw ex }
    Quit output
}

}
